import {Dispatch, SetStateAction} from "react";

function normalHunger(setHungerValue: Dispatch<SetStateAction<number>>) {
    setHungerValue(
        prevHungerValue => Math.max(prevHungerValue - 1, 0)
    )
}
function normalWater(setWaterValue: Dispatch<SetStateAction<number>>) {
    setWaterValue(
        prevWaterValue => Math.max(prevWaterValue - 1, 0)
    )
}
function normalHealth(setHealthValue: Dispatch<SetStateAction<number>>) {
    setHealthValue(
        prevHealthValue => Math.max(prevHealthValue - 1, 0)
    )
}
function normalMood(setMoodValue: Dispatch<SetStateAction<number>>) {
    setMoodValue(
        prevMoodValue => Math.max(prevMoodValue - 1, 0)
    )
}

export default function normalBehavior(setHungerValue: Dispatch<SetStateAction<number>>, setWaterValue: Dispatch<SetStateAction<number>>,
                                       setHealthValue: Dispatch<SetStateAction<number>>, setMoodValue: Dispatch<SetStateAction<number>>) {
    normalHunger(setHungerValue);
    normalWater(setWaterValue);
    normalHealth(setHealthValue);
    normalMood(setMoodValue);
};